<?php 
namespace ZN\Services;

interface CURLInterface
{
	//----------------------------------------------------------------------------------------------------
	//
	// Yazar      : Ozan UYKUN <ozanbote@windowslive.com> | <ozanbote@gmail.com>
	// Site       : www.zntr.net
	// Lisans     : The MIT License
	// Telif Hakkı: Copyright (c) 2012-2016, zntr.net
	//
	//----------------------------------------------------------------------------------------------------

	/******************************************************************************************
	* INIT		                                                                              *
	*******************************************************************************************
	| Genel Kullanım: Bir CURL oturumunu ilklendirir.										  |
	
	  @param string $url NULL
	  
	  @return resource
	|														                                  |
	******************************************************************************************/
	public function init($url);
	
	/******************************************************************************************
	* EXEC	                                                                                  *
	*******************************************************************************************
	| Genel Kullanım: Bir CURL oturumunu işleme sokar.										  |
	
	  @param resource $ch;
	  
	  @return mixed
	|														                                  |
	******************************************************************************************/
	public function exec();
	
	/******************************************************************************************
	* ESCAPE	                                                                              *
	*******************************************************************************************
	| Genel Kullanım: Verilen dizgenin URL'sini kodlar.										  |
	
	  @param string   $str
	  
	  @return string
	|														                                  |
	******************************************************************************************/
	public function escape($str);
	
	/******************************************************************************************
	* UNESCAPE	                                                                              *
	*******************************************************************************************
	| Genel Kullanım: Şifrelenmiş URL verisini çözer.										  |
		
	  @param string   $str
	  
	  @return string
	|														                                  |
	******************************************************************************************/
	public function unescape($str);
	
	/******************************************************************************************
	* INFO		                                                                              *
	*******************************************************************************************
	| Genel Kullanım: Belirtilen tanıtıcı ile ilgili son aktarım hakkında bilgi verir.		  |
	
	  @param mixed    $opt -> CURLINFO_ ön ekinin kullanılmasına gerek yoktur.
	  
	  CURLINFO_EFFECTIVE_URL yerine 'effective_url' gibi bir kullanım mümkündür.
	|														                                  |
	******************************************************************************************/
	public function info($opt);
	
	/******************************************************************************************
	* ERROR		                                                                              *
	*******************************************************************************************
	| Genel Kullanım: CURL işlemleri esnasına oluşan hatalar hakkında bilgi almak için.		  |
	
	  @param resource $ch
	|														                                  |
	******************************************************************************************/
	public function error();
	
	/******************************************************************************************
	* ERRNO		                                                                              *
	*******************************************************************************************
	| Genel Kullanım: Belirtilen oturumdaki son hatanın kodunu döndürür.					  |
	  
	  @param resource $ch
	  
	  @return int
	|														                                  |
	******************************************************************************************/
	public function errno();

	/******************************************************************************************
	* PAUSE                                                                                   *
	*******************************************************************************************
	| Genel Kullanım: Bir bağlantıyı dururur.												  |
	
	  @param int      $bitmask 0
	  
	  @return int											 
	|														                                  |
	******************************************************************************************/
	public function pause($bitmask);
	
	/******************************************************************************************
	* RESET                                                                                   *
	*******************************************************************************************
	| Genel Kullanım: Bir CURL tanıcısını yeniden başlatır.									  |
	
	  @param resource $ch
	  
	  @return void
	|														                                  |
	******************************************************************************************/
	public function reset();
	
	/******************************************************************************************
	* OPTION                     		                                                      *
	*******************************************************************************************
	| Genel Kullanım:  Bir CURL aktarım seçeneği tanımlar.									  |	

	  @param mixed    $options
	  @param mixed	  $value
	  
	  @return bool								
	|														                                  |
	******************************************************************************************/
	public function option($options, $value);
	
	/******************************************************************************************
	* CLOSE                                                                                   *
	*******************************************************************************************
	| Genel Kullanım: CURL oturumunu sonlandırır.											  |
	
	  @param resource $ch
	  
	  @return void
	|														                                  |
	******************************************************************************************/
	public function close();

	/******************************************************************************************
	* ERROR VAL                                                                               *
	*******************************************************************************************
	| Genel Kullanım: Dönen hata numarasına göre hatanın içeriğini döndürür.				  |
	
	  @param numeric $errno
	  
	  @return string
	|														                                  |
	******************************************************************************************/
	public function errval($errno);
	
	/******************************************************************************************
	* VERSION                                                                                 *
	*******************************************************************************************
	| Genel Kullanım: Geçerli CURL versiyonu hakkında bir dizi döndürür.					  |
	
	  @param mixed $age now
	  
	  @return array
	|														                                  |
	******************************************************************************************/
	public function version($data);
}